﻿using CardGameCore.Battle;
using CardGameCore.Driver;
using UnityEngine;
using Zenject;

namespace CardGame.InGame
{
    public interface IGameCoreStart
    {
        void Start();
    }
    
    public class GameListener : IGameListener, IGameCoreStart
    {
        [Inject] private ICoreDriver _coreDriver = null;
        
        public void OnGameInitialize()
        {
            Debug.Log("OnGameInitialize");
        }

        public void OnGameReady()
        {
            Debug.Log("OnGameReady");
        }

        public void OnRoundStart()
        {
            Debug.Log("OnRoundStart");
        }

        public void OnPlayerSelectCard(PlayerSelectCardResult result)
        {
            Debug.Log("OnPlayerSelectCard");
        }

        public void OnPlayerAction(BattleEventsResult result)
        {
            Debug.Log("OnPlayerAction");
        }

        public void OnEnemySelectCard()
        {
            Debug.Log("OnEnemySelectCard");
        }

        public void OnEnemyAction(BattleEventsResult result)
        {
            Debug.Log("OnEnemyAction");
        }

        public void OnJudge(JudgeResult result)
        {
            Debug.Log("OnJudge");
        }

        public void Start()
        {
            _coreDriver.GameListener = this;
            _coreDriver.Next();
        }
    }
}